home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_02
/
9n02094a
< prev
next >
Wrap
Text File
|
1990-12-16
|
1KB
|
52 lines
/*
* 27-Mar-1990 - created
*/
/***********************************************************
*
* Module: portdefs.h
*
* Purpose: include file for portability definitions
*
* The definitions in this file are system and compiler
* dependent. You should adjust them as necessary to
* fit your environment.
*
**********************************************************/
#ifndef PORTDEFS_H
#define PORTDEFS_H
/**** define the system ****/
#undef SUN
/* use function prototypes */
#define PROTO
#ifdef SUN
#undef PROTO
#endif
#ifndef _TYPES_
typedef unsigned int uint; /* for unsigned int */
#endif
typedef unsigned char ubyte; /* for unsigned byte */
typedef char bool; /* for boolean comparisons) */
typedef unsigned int index_t; /* index variable for loops */
/* random number generators */
#ifdef __TURBOC__
#define RANDOM() rand()
#define RANDOMIZE() randomize()
#else
#ifdef SUN
#define RANDOM() random()
#define RANDOMIZE() srandom((int)(time(NULL)))
#else
#define RANDOM() rand()
#define RANDOMIZE() srand((int)(time(NULL)))
#endif
#endif
#endif /* PORTDEFS_H */
/*
* end of file
*/